<p>This is an issue when a function only calls a built-in type conversion function (<code>String</code>, <code>Number</code>, <code>BigInt</code>,
<code>Boolean</code>, or <code>Symbol</code>) without adding any additional logic.</p>
<h2>Why is this an issue?</h2>
<p>Creating wrapper functions around built-in type conversion functions is unnecessary and adds complexity without benefit.</p>
<p>JavaScript’s built-in functions like <code>String()</code>, <code>Number()</code>, <code>Boolean()</code>, <code>BigInt()</code>, and
<code>Symbol()</code> can be used directly as callbacks or assigned to variables. When you wrap these functions in arrow functions or function
declarations that only pass through arguments, you create:</p>
<ul>
  <li> <strong>Unnecessary function call overhead</strong>: Each wrapper adds an extra function call in the execution stack </li>
  <li> <strong>Reduced readability</strong>: The wrapper obscures the intent and makes the code longer </li>
  <li> <strong>Maintenance burden</strong>: More code to maintain without functional benefit </li>
</ul>
<p>The built-in functions are designed to work directly in contexts where callbacks are expected, such as with array methods like <code>map()</code>,
<code>filter()</code>, or <code>some()</code>.</p>
<h3>What is the potential impact?</h3>
<p>This issue impacts code maintainability and performance. The unnecessary wrapper functions create additional function calls that could be avoided,
and they make the codebase more verbose without providing any functional benefit. While the performance impact is typically minimal, the readability
and maintainability improvements from using built-in functions directly are significant.</p>
<h3>How to fix?</h3>
<p>Replace wrapper functions with direct references to built-in type conversion functions. Instead of creating a function that only calls the
built-in, use the built-in function directly.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
const toBoolean = value =&gt; Boolean(value); // Noncompliant
const numbers = strings.map(str =&gt; Number(str)); // Noncompliant

function toString(value) { // Noncompliant
  return String(value);
}
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
const toBoolean = Boolean;
const numbers = strings.map(Number);

const toString = String;
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/prefer-native-coercion-functions.md">prefer-native-coercion-functions</a> </li>
  <li> MDN - String - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">Documentation for JavaScript’s
  built-in String function</a> </li>
  <li> MDN - Number - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">Documentation for JavaScript’s
  built-in Number function</a> </li>
  <li> MDN - Boolean - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Documentation for
  JavaScript’s built-in Boolean function</a> </li>
  <li> MDN - BigInt - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt">Documentation for JavaScript’s
  built-in BigInt function</a> </li>
  <li> MDN - Symbol - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol">Documentation for JavaScript’s
  built-in Symbol function</a> </li>
</ul>
